package simplebinding.guice;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

import com.google.inject.BindingAnnotation;

/**
 * Indicates we want the blue version of a binding.
 * @Retention - allows your annotation to be visible at runtime
 * @Target  - is a courtesy to your users; it prevents @Blue from being applied
 * to methods, types, local variables, and other annotations, where it would serve no purpose.
 * @BindingAnnotation - Guice-specific signal that you wish your annotation to be used in this way.  Guice will produce an error whenever user applies more than one binding annotation to the same injectable element.
 */

@Retention(RetentionPolicy.RUNTIME) //Options:  CLASS, RUNTIME, SOURCE
@Target({ElementType.FIELD, ElementType.PARAMETER}) //Options: CONSTRUCTOR, FIELD, LOCAL_VARIABLE, METHOD, PACKAGE, PARAMETER, TYPE
@BindingAnnotation
public @interface Blue {

}
